package common

import (
	"beesoft.ink/application/media/app/model"
	"beesoft.ink/application/media/app/model/base"
)

const (
	LanguageTypeLanguage           = 10
	LanguageTypeSubLanguage        = 11
	LanguageTypeLanguageCountry    = 20
	LanguageTypeSubLanguageCountry = 21
)

type Language struct {
	model.Model `xorm:"extends"`
	Type        uint           `json:"type"`
	Slug        string         `json:"slug"`
	Title       string         `json:"-"`
	Titles      base.Languages `xorm:"-" json:"titles"`
}

func (Language) TableName() string {
	return "beesoft_base_languages"
}

type LanguageListReq struct {
	model.Pagination
	model.Sorting
	Type int `json:"type" query:"type" default:"1"`
}
